#include "wrapper.h"
#include "api.h"


void *c_create() {
    return new C;
}

void c_add(void *p, int v) {
    auto c = static_cast<C*>(p);
    *c += v;
}

void c_sub(void *p, int v) {
    auto c = static_cast<C*>(p);
    *c -= v;
}

void c_output(void *p) {
    auto c = static_cast<C*>(p);
    cout << *c;
}

void c_destroy(void *p) {
    auto c = static_cast<C*>(p);
    delete c;
}

